1. Technical Field
The present invention relates in general to data processing systems, and more specifically, the present invention relates to handling translations within a data processing system. Still more particularly, the present invention relates to improving data processing system performance utilizing a translation lookaside buffer.
2. Description of the Related Art
Modern data processing systems typically utilize a virtual memory system to address very large amounts of memory, even thought the main memory of the system encompasses a much smaller address space. Typically, memories with small storage capacities (e.g., caches) have quicker access times. Accordingly, memories with large storage capacities (e.g., hard disk drive) have slower access times. Therefore, virtual memory systems present the illusion of a very large available system memory by storing frequently accessed data in caches and main memory. The virtual memory system stores less-frequently accessed data in the hard disk drive and retrieves the data only when needed. Therefore, since an access to the hard disk drive would result in a large performance penalty due to the slow access times of a hard disk drive, a virtual memory system where frequently-accessed data is stored in cache or main memory improves data processing system performance.
To facilitate the retrieval and access of data, virtual memory systems typically define discrete memory units such as pages or segments that include both virtual memory addresses and a corresponding physical memory address. The actual physical memory address may point to a location in a cache, main memory, or a slower alternate memory, such as the hard disk drive. If the physical address of the requested data is in a cache or main memory, the data is easily and quickly accessed and utilized. If, however, the physical address indicates that the page is located in an alternate memory location, such as a hard disk drive, the page must be transferred and “swapped” to main memory, where the data can then be accessed. This transfer typically requires that other data located in the cache or main memory be transferred out of the cache or main memory back to the hard disk drive in order to free up enough memory for storage of the newly-retrieved data. Transfers between levels of the memory hierarchy are typically controlled by a memory management unit.
The paging process requires a data structure, typically called a page table, that indexes the different pages handled by the data processing system. A typical page table is usually indexed by virtual page numbers, the size of the tables, the number of pages, and the virtual address space. Page tables are usually very large and are stored in main memory and are often paged. Accordingly, if a processor in a data processing system requests access to data stored in main memory, the processor must first refer to a page table located in memory to determine the physical address of the requested data. Then, the processor must access the main memory again to perform the actual data retrieval.
Those with skill in this art will appreciate that a method of minimizing the cost of main memory access time is to cache recently-accessed translations so that the mapping process is skipped if the current address references the same page as a recently accessed address reference. Typically, the last translation is saved in a special translation cache, usually known to those skilled in this art as a translation lookaside buffer (TLB). A TLB entry, also called a page table entry (PTE), typically includes multiple fields such as: a virtual address, a physical page frame number, protection fields, use bits, and a modified or dirty bit.
However, traditional translation lookaside buffers store page table entries which correspond only to the current task being executed by the data processing system. When a task switch occurs, the entire translation lookaside buffer must be flushed (e.g., invalidated) in order to store the page table entries for the new task. After the invalidation of the translation lookaside buffer for the new task, subsequent memory accesses to the page table to refresh the translation lookaside buffer consume many clock cycles and have a negative impact on the performance of the data processing system. Therefore, there is need for a system and method of providingaccess to recently-accessed page table entries and improving task switching performance in a data processing system.